import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: { title: "欢迎使用"}
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
    meta: { title: "关于软件" }
  },
  {
    path: "/scan",
    name: "Scan",
    component: () => import("@/views/DocScan.vue"),
    meta: { title: "文件扫描" }
  },
  {
    path: "/hdrft",
    name: "Header & Footer",
    component: () => import("@/views/DocHdrFt.vue"),
    meta: { title: "文档处理" }
  },
  {
    path: "/settings",
    name: "Settings",
    component: () => import("@/views/DocSettings.vue"),
    meta: { title: "文件设置"}
  }
]

const router = new VueRouter({
  routes
})

export default router
